<?PHP
$DefaultString='[{"id":"_1222679990015","type":"o","num":7,"message":null,"error":0},{"is_building":false,"is_military":[],"is_soldier":[[],[]],"city_army":[[{"army_type":"1","army_num":"1","army_content":"75086","map_id":"220487","general_flag":"1","general_type":"8","general_name":"\u738b\u9038\u96ea","general_rank":"1"}],[]],"new_msg":[{"msg_num":"4","military_num":"0","union_msg_num":"0","sys_num":"0"}],"time":"new Date(2008,8,29,17,23,44)","other_login":false},"\u767b\u5f55\u6b21\u6570:2\nCOOKIE\u6b21\u6570:1\nthis_login_ip:222.189.66.32"]';

if(isset($_REQUEST['module']))
{
	if($_REQUEST['module']=="msg")
	{
		LoadData(strtolower($_REQUEST['act']),'msg');
	}
	elseif($_REQUEST['module']=="task")
	{
		echo '[{"module":"task","act":"unknow","type":"unknow","time":"new Date('.date('Y,m,d,H,i,s').')"}]';
	}
}
elseif (isset($_REQUEST['type']) and $_REQUEST['type']!="o" and $_REQUEST['type']!="e")
{
	LoadData(strtolower($_REQUEST['type']),'type');
}
elseif(isset($_REQUEST['act']))
{
	LoadData(strtolower($_REQUEST['act']),'act');
}
else
{
	echo $DefaultString;
}
function LoadData($act,$path="act")
{
	if($act)
	{
		$FilePath="@data/$path/$act.txt";
		if(file_exists($FilePath))
		{
			echo file_get_contents($FilePath);
		}
	}
}
?>